package d.n.d.dao;

import java.util.Date;
import java.util.List;
import d.n.d.domain.Account;
import d.n.d.domain.Transaction;

/**
 * 
 * @author D.N.D
 *
 */
public interface TransactionDao {

	/**
	 * <br> Get transaction list by account id. <br/>
	 * @param accountId
	 * @return List<Transaction>
	 */
	public List<Transaction> getTransactionListByAccountId(String accountId);

	/**
	 * <br> Get transaction list by customer. <br/>
	 * @param from
	 * @param to
	 * @param userId
	 * @return List<Transaction>
	 */
	public List<Transaction> getTransactionListByCustomer(Date from, Date to,String userId);
	
	/**
	 * <br> Author: DucDS </br>
	 * <br> Get transaction list pending. <br>
	 * @return List<Transaction>
	 */
	public List<Transaction> getTransactionListPending();

	/**
	 * <br> Find transaction by id. <br/>
	 * @param transactionId
	 * @return Transaction
	 */
	public Transaction findTransactionById(int transactionId);

	/**
	 * <br> Find transaction by Id. <br/>
	 * @param transactionId
	 * @return Transaction
	 */
	public Transaction findTransactionByStringId(String transactionId);
	
	/**
	 * <br> Insert new transaction. <br/>
	 * @param newTransaction
	 * @return boolean
	 */
	public boolean insertNewTransaction(Transaction newTransaction);
	
	/**
	 * <br> Update transaction. <br/>
	 * @param transaction
	 * @return boolean
	 */
	public boolean updateTransaction(Transaction transaction);
	
	/**
	 * <br> update. <br/>
	 * @param account
	 * @param transaction
	 * @return boolean
	 */
	public boolean update(Account account, Transaction transaction);

	/**
	 * <br> update. <br/>
	 * @param sendAccount
	 * @param receiveAccount
	 * @param transaction
	 * @return boolean
	 */
	public boolean update(Account sendAccount,Account receiveAccount, Transaction transaction);


}
